{{ template "header.html" . }}

<div class="content">
  <h2 class="content-title">
      {{ if eq (extra "lang") "en" }}
      Enter User Code
      {{ else }}
      Введите код
      {{ end }}
  </h2>
  <form method="post" action="{{ .PostURL }}" method="get" class="grid">
    <div>
      {{ if( .UserCode  )}}
      <input tabindex="2" required id="user_code" name="user_code" type="text" class="input" autocomplete="off" value="{{.UserCode}}" {{ if .Invalid }} autofocus {{ end }}/>
      {{ else }}
      <input tabindex="2" required id="user_code" name="user_code" type="text" class="input" placeholder="XXXX-XXXX" autocomplete="off"  {{ if .Invalid }} autofocus {{ end }}/>
      {{ end }}
    </div>

    {{ if .Invalid }}
    <div id="login-error" class="form-error">
        {{ if eq (extra "lang") "en" }}
        Invalid or Expired User Code
        {{ else }}
        Неверный или устаревший User Code
        {{ end }}
    </div>
    {{ end }}
    <button tabindex="3" id="submit-login" type="submit" class="btn btn-primary">
        {{ if eq (extra "lang") "en" }}
        Submit
        {{ else }}
        Отправить
        {{ end }}
    </button>
  </form>
</div>

{{ template "footer.html" . }}
